3.42 \(\int \csc (a+b x) \csc ^2(2 a+2 b x) \, dx\)

Optimal. Leaf size=49 \[ \frac {3 \sec (a+b x)}{8 b}-\frac {3 \tanh ^{-1}(\cos (a+b x))}{8 b}-\frac {\csc ^2(a+b x) \sec (a+b x)}{8 b} \]

[Out]

-3/8*arctanh(cos(b*x+a))/b+3/8*sec(b*x+a)/b-1/8*csc(b*x+a)^2*sec(b*x+a)/b

________________________________________________________________________________________

Rubi [A]  time = 0.06, antiderivative size = 49, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.278, Rules used = {4288, 2622, 288, 321, 207} \[ \frac {3 \sec (a+b x)}{8 b}-\frac {3 \tanh ^{-1}(\cos (a+b x))}{8 b}-\frac {\csc ^2(a+b x) \sec (a+b x)}{8 b} \]

Antiderivative was successfully verified.

[In]

Int[Csc[a + b*x]*Csc[2*a + 2*b*x]^2,x]

[Out]

(-3*ArcTanh[Cos[a + b*x]])/(8*b) + (3*Sec[a + b*x])/(8*b) - (Csc[a + b*x]^2*Sec[a + b*x])/(8*b)

Rule 207

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTanh[(Rt[b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && NegQ[a/b] && (LtQ[a, 0] || GtQ[b, 0])

Rule 288

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(c^(n - 1)*(c*x)^(m - n + 1)*(a + b*x^
n)^(p + 1))/(b*n*(p + 1)), x] - Dist[(c^n*(m - n + 1))/(b*n*(p + 1)), Int[(c*x)^(m - n)*(a + b*x^n)^(p + 1), x
], x] /; FreeQ[{a, b, c}, x] && IGtQ[n, 0] && LtQ[p, -1] && GtQ[m + 1, n] &&  !ILtQ[(m + n*(p + 1) + 1)/n, 0]
&& IntBinomialQ[a, b, c, n, m, p, x]

Rule 321

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(c^(n - 1)*(c*x)^(m - n + 1)*(a + b*x^n
)^(p + 1))/(b*(m + n*p + 1)), x] - Dist[(a*c^n*(m - n + 1))/(b*(m + n*p + 1)), Int[(c*x)^(m - n)*(a + b*x^n)^p
, x], x] /; FreeQ[{a, b, c, p}, x] && IGtQ[n, 0] && GtQ[m, n - 1] && NeQ[m + n*p + 1, 0] && IntBinomialQ[a, b,
 c, n, m, p, x]

Rule 2622

Int[csc[(e_.) + (f_.)*(x_)]^(n_.)*((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Dist[1/(f*a^n), Subst[Int
[x^(m + n - 1)/(-1 + x^2/a^2)^((n + 1)/2), x], x, a*Sec[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n
 + 1)/2] &&  !(IntegerQ[(m + 1)/2] && LtQ[0, m, n])

Rule 4288

Int[((f_.)*sin[(a_.) + (b_.)*(x_)])^(n_.)*sin[(c_.) + (d_.)*(x_)]^(p_.), x_Symbol] :> Dist[2^p/f^p, Int[Cos[a
+ b*x]^p*(f*Sin[a + b*x])^(n + p), x], x] /; FreeQ[{a, b, c, d, f, n}, x] && EqQ[b*c - a*d, 0] && EqQ[d/b, 2]
&& IntegerQ[p]

Rubi steps

\begin {align*} \int \csc (a+b x) \csc ^2(2 a+2 b x) \, dx &=\frac {1}{4} \int \csc ^3(a+b x) \sec ^2(a+b x) \, dx\\ &=\frac {\operatorname {Subst}\left (\int \frac {x^4}{\left (-1+x^2\right )^2} \, dx,x,\sec (a+b x)\right )}{4 b}\\ &=-\frac {\csc ^2(a+b x) \sec (a+b x)}{8 b}+\frac {3 \operatorname {Subst}\left (\int \frac {x^2}{-1+x^2} \, dx,x,\sec (a+b x)\right )}{8 b}\\ &=\frac {3 \sec (a+b x)}{8 b}-\frac {\csc ^2(a+b x) \sec (a+b x)}{8 b}+\frac {3 \operatorname {Subst}\left (\int \frac {1}{-1+x^2} \, dx,x,\sec (a+b x)\right )}{8 b}\\ &=-\frac {3 \tanh ^{-1}(\cos (a+b x))}{8 b}+\frac {3 \sec (a+b x)}{8 b}-\frac {\csc ^2(a+b x) \sec (a+b x)}{8 b}\\ \end {align*}

________________________________________________________________________________________

Mathematica [B]  time = 0.26, size = 143, normalized size = 2.92 \[ \frac {\csc ^4(a+b x) \left (-6 \cos (2 (a+b x))+2 \cos (3 (a+b x))+3 \cos (3 (a+b x)) \log \left (\cos \left (\frac {1}{2} (a+b x)\right )\right )-3 \cos (3 (a+b x)) \log \left (\sin \left (\frac {1}{2} (a+b x)\right )\right )+\cos (a+b x) \left (3 \log \left (\sin \left (\frac {1}{2} (a+b x)\right )\right )-3 \log \left (\cos \left (\frac {1}{2} (a+b x)\right )\right )-2\right )+2\right )}{8 b \left (\csc ^2\left (\frac {1}{2} (a+b x)\right )-\sec ^2\left (\frac {1}{2} (a+b x)\right )\right )} \]

Antiderivative was successfully verified.

[In]

Integrate[Csc[a + b*x]*Csc[2*a + 2*b*x]^2,x]

[Out]

(Csc[a + b*x]^4*(2 - 6*Cos[2*(a + b*x)] + 2*Cos[3*(a + b*x)] + 3*Cos[3*(a + b*x)]*Log[Cos[(a + b*x)/2]] - 3*Co
s[3*(a + b*x)]*Log[Sin[(a + b*x)/2]] + Cos[a + b*x]*(-2 - 3*Log[Cos[(a + b*x)/2]] + 3*Log[Sin[(a + b*x)/2]])))
/(8*b*(Csc[(a + b*x)/2]^2 - Sec[(a + b*x)/2]^2))

________________________________________________________________________________________

fricas [B]  time = 0.44, size = 96, normalized size = 1.96 \[ \frac {6 \, \cos \left (b x + a\right )^{2} - 3 \, {\left (\cos \left (b x + a\right )^{3} - \cos \left (b x + a\right )\right )} \log \left (\frac {1}{2} \, \cos \left (b x + a\right ) + \frac {1}{2}\right ) + 3 \, {\left (\cos \left (b x + a\right )^{3} - \cos \left (b x + a\right )\right )} \log \left (-\frac {1}{2} \, \cos \left (b x + a\right ) + \frac {1}{2}\right ) - 4}{16 \, {\left (b \cos \left (b x + a\right )^{3} - b \cos \left (b x + a\right )\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(b*x+a)*csc(2*b*x+2*a)^2,x, algorithm="fricas")

[Out]

1/16*(6*cos(b*x + a)^2 - 3*(cos(b*x + a)^3 - cos(b*x + a))*log(1/2*cos(b*x + a) + 1/2) + 3*(cos(b*x + a)^3 - c
os(b*x + a))*log(-1/2*cos(b*x + a) + 1/2) - 4)/(b*cos(b*x + a)^3 - b*cos(b*x + a))

________________________________________________________________________________________

giac [B]  time = 1.61, size = 1327, normalized size = 27.08 \[ \text {result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(b*x+a)*csc(2*b*x+2*a)^2,x, algorithm="giac")

[Out]

-1/32*(16*(6*tan(1/2*b*x + 2*a)*tan(1/2*a)^11 - tan(1/2*a)^12 - 2*tan(1/2*b*x + 2*a)*tan(1/2*a)^9 + 12*tan(1/2
*a)^10 - 36*tan(1/2*b*x + 2*a)*tan(1/2*a)^7 + 27*tan(1/2*a)^8 - 36*tan(1/2*b*x + 2*a)*tan(1/2*a)^5 - 2*tan(1/2
*b*x + 2*a)*tan(1/2*a)^3 - 27*tan(1/2*a)^4 + 6*tan(1/2*b*x + 2*a)*tan(1/2*a) - 12*tan(1/2*a)^2 + 1)/((tan(1/2*
b*x + 2*a)^2*tan(1/2*a)^6 - 15*tan(1/2*b*x + 2*a)^2*tan(1/2*a)^4 + 12*tan(1/2*b*x + 2*a)*tan(1/2*a)^5 - tan(1/
2*a)^6 + 15*tan(1/2*b*x + 2*a)^2*tan(1/2*a)^2 - 40*tan(1/2*b*x + 2*a)*tan(1/2*a)^3 + 15*tan(1/2*a)^4 - tan(1/2
*b*x + 2*a)^2 + 12*tan(1/2*b*x + 2*a)*tan(1/2*a) - 15*tan(1/2*a)^2 + 1)*(tan(1/2*a)^6 - 15*tan(1/2*a)^4 + 15*t
an(1/2*a)^2 - 1)) + (6*tan(1/2*b*x + 2*a)^3*tan(1/2*a)^23 - tan(1/2*b*x + 2*a)^2*tan(1/2*a)^24 - 74*tan(1/2*b*
x + 2*a)^3*tan(1/2*a)^21 + 60*tan(1/2*b*x + 2*a)^2*tan(1/2*a)^22 - 6*tan(1/2*b*x + 2*a)*tan(1/2*a)^23 + 798*ta
n(1/2*b*x + 2*a)^3*tan(1/2*a)^19 - 924*tan(1/2*b*x + 2*a)^2*tan(1/2*a)^20 + 290*tan(1/2*b*x + 2*a)*tan(1/2*a)^
21 - 18*tan(1/2*a)^22 - 1170*tan(1/2*b*x + 2*a)^3*tan(1/2*a)^17 + 3892*tan(1/2*b*x + 2*a)^2*tan(1/2*a)^18 - 23
10*tan(1/2*b*x + 2*a)*tan(1/2*a)^19 + 336*tan(1/2*a)^20 - 3188*tan(1/2*b*x + 2*a)^3*tan(1/2*a)^15 + 1467*tan(1
/2*b*x + 2*a)^2*tan(1/2*a)^16 + 3186*tan(1/2*b*x + 2*a)*tan(1/2*a)^17 - 1190*tan(1/2*a)^18 + 2604*tan(1/2*b*x
+ 2*a)^3*tan(1/2*a)^13 - 12744*tan(1/2*b*x + 2*a)^2*tan(1/2*a)^14 + 8148*tan(1/2*b*x + 2*a)*tan(1/2*a)^15 - 28
8*tan(1/2*a)^16 + 2604*tan(1/2*b*x + 2*a)^3*tan(1/2*a)^11 - 10332*tan(1/2*b*x + 2*a)*tan(1/2*a)^13 + 4428*tan(
1/2*a)^14 - 3188*tan(1/2*b*x + 2*a)^3*tan(1/2*a)^9 + 12744*tan(1/2*b*x + 2*a)^2*tan(1/2*a)^10 - 10332*tan(1/2*
b*x + 2*a)*tan(1/2*a)^11 - 1170*tan(1/2*b*x + 2*a)^3*tan(1/2*a)^7 - 1467*tan(1/2*b*x + 2*a)^2*tan(1/2*a)^8 + 8
148*tan(1/2*b*x + 2*a)*tan(1/2*a)^9 - 4428*tan(1/2*a)^10 + 798*tan(1/2*b*x + 2*a)^3*tan(1/2*a)^5 - 3892*tan(1/
2*b*x + 2*a)^2*tan(1/2*a)^6 + 3186*tan(1/2*b*x + 2*a)*tan(1/2*a)^7 + 288*tan(1/2*a)^8 - 74*tan(1/2*b*x + 2*a)^
3*tan(1/2*a)^3 + 924*tan(1/2*b*x + 2*a)^2*tan(1/2*a)^4 - 2310*tan(1/2*b*x + 2*a)*tan(1/2*a)^5 + 1190*tan(1/2*a
)^6 + 6*tan(1/2*b*x + 2*a)^3*tan(1/2*a) - 60*tan(1/2*b*x + 2*a)^2*tan(1/2*a)^2 + 290*tan(1/2*b*x + 2*a)*tan(1/
2*a)^3 - 336*tan(1/2*a)^4 + tan(1/2*b*x + 2*a)^2 - 6*tan(1/2*b*x + 2*a)*tan(1/2*a) + 18*tan(1/2*a)^2)/((9*tan(
1/2*a)^10 - 60*tan(1/2*a)^8 + 118*tan(1/2*a)^6 - 60*tan(1/2*a)^4 + 9*tan(1/2*a)^2)*(3*tan(1/2*b*x + 2*a)^2*tan
(1/2*a)^5 - tan(1/2*b*x + 2*a)*tan(1/2*a)^6 - 10*tan(1/2*b*x + 2*a)^2*tan(1/2*a)^3 + 15*tan(1/2*b*x + 2*a)*tan
(1/2*a)^4 - 3*tan(1/2*a)^5 + 3*tan(1/2*b*x + 2*a)^2*tan(1/2*a) - 15*tan(1/2*b*x + 2*a)*tan(1/2*a)^2 + 10*tan(1
/2*a)^3 + tan(1/2*b*x + 2*a) - 3*tan(1/2*a))^2) + 12*log(abs(tan(1/2*b*x + 2*a)*tan(1/2*a)^3 - 3*tan(1/2*b*x +
 2*a)*tan(1/2*a) + 3*tan(1/2*a)^2 - 1)) - 12*log(abs(3*tan(1/2*b*x + 2*a)*tan(1/2*a)^2 - tan(1/2*a)^3 - tan(1/
2*b*x + 2*a) + 3*tan(1/2*a))))/b

________________________________________________________________________________________

maple [A]  time = 0.92, size = 57, normalized size = 1.16 \[ -\frac {1}{8 b \sin \left (b x +a \right )^{2} \cos \left (b x +a \right )}+\frac {3}{8 b \cos \left (b x +a \right )}+\frac {3 \ln \left (\csc \left (b x +a \right )-\cot \left (b x +a \right )\right )}{8 b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(b*x+a)*csc(2*b*x+2*a)^2,x)

[Out]

-1/8/b/sin(b*x+a)^2/cos(b*x+a)+3/8/b/cos(b*x+a)+3/8/b*ln(csc(b*x+a)-cot(b*x+a))

________________________________________________________________________________________

maxima [B]  time = 0.38, size = 974, normalized size = 19.88 \[ \text {result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(b*x+a)*csc(2*b*x+2*a)^2,x, algorithm="maxima")

[Out]

1/16*(4*(3*cos(5*b*x + 5*a) - 2*cos(3*b*x + 3*a) + 3*cos(b*x + a))*cos(6*b*x + 6*a) - 12*(cos(4*b*x + 4*a) + c
os(2*b*x + 2*a) - 1)*cos(5*b*x + 5*a) + 4*(2*cos(3*b*x + 3*a) - 3*cos(b*x + a))*cos(4*b*x + 4*a) + 8*(cos(2*b*
x + 2*a) - 1)*cos(3*b*x + 3*a) - 12*cos(2*b*x + 2*a)*cos(b*x + a) + 3*(2*(cos(4*b*x + 4*a) + cos(2*b*x + 2*a)
- 1)*cos(6*b*x + 6*a) - cos(6*b*x + 6*a)^2 - 2*(cos(2*b*x + 2*a) - 1)*cos(4*b*x + 4*a) - cos(4*b*x + 4*a)^2 -
cos(2*b*x + 2*a)^2 + 2*(sin(4*b*x + 4*a) + sin(2*b*x + 2*a))*sin(6*b*x + 6*a) - sin(6*b*x + 6*a)^2 - sin(4*b*x
 + 4*a)^2 - 2*sin(4*b*x + 4*a)*sin(2*b*x + 2*a) - sin(2*b*x + 2*a)^2 + 2*cos(2*b*x + 2*a) - 1)*log(cos(b*x)^2
+ 2*cos(b*x)*cos(a) + cos(a)^2 + sin(b*x)^2 - 2*sin(b*x)*sin(a) + sin(a)^2) - 3*(2*(cos(4*b*x + 4*a) + cos(2*b
*x + 2*a) - 1)*cos(6*b*x + 6*a) - cos(6*b*x + 6*a)^2 - 2*(cos(2*b*x + 2*a) - 1)*cos(4*b*x + 4*a) - cos(4*b*x +
 4*a)^2 - cos(2*b*x + 2*a)^2 + 2*(sin(4*b*x + 4*a) + sin(2*b*x + 2*a))*sin(6*b*x + 6*a) - sin(6*b*x + 6*a)^2 -
 sin(4*b*x + 4*a)^2 - 2*sin(4*b*x + 4*a)*sin(2*b*x + 2*a) - sin(2*b*x + 2*a)^2 + 2*cos(2*b*x + 2*a) - 1)*log(c
os(b*x)^2 - 2*cos(b*x)*cos(a) + cos(a)^2 + sin(b*x)^2 + 2*sin(b*x)*sin(a) + sin(a)^2) + 4*(3*sin(5*b*x + 5*a)
- 2*sin(3*b*x + 3*a) + 3*sin(b*x + a))*sin(6*b*x + 6*a) - 12*(sin(4*b*x + 4*a) + sin(2*b*x + 2*a))*sin(5*b*x +
 5*a) + 4*(2*sin(3*b*x + 3*a) - 3*sin(b*x + a))*sin(4*b*x + 4*a) + 8*sin(3*b*x + 3*a)*sin(2*b*x + 2*a) - 12*si
n(2*b*x + 2*a)*sin(b*x + a) + 12*cos(b*x + a))/(b*cos(6*b*x + 6*a)^2 + b*cos(4*b*x + 4*a)^2 + b*cos(2*b*x + 2*
a)^2 + b*sin(6*b*x + 6*a)^2 + b*sin(4*b*x + 4*a)^2 + 2*b*sin(4*b*x + 4*a)*sin(2*b*x + 2*a) + b*sin(2*b*x + 2*a
)^2 - 2*(b*cos(4*b*x + 4*a) + b*cos(2*b*x + 2*a) - b)*cos(6*b*x + 6*a) + 2*(b*cos(2*b*x + 2*a) - b)*cos(4*b*x
+ 4*a) - 2*b*cos(2*b*x + 2*a) - 2*(b*sin(4*b*x + 4*a) + b*sin(2*b*x + 2*a))*sin(6*b*x + 6*a) + b)

________________________________________________________________________________________

mupad [B]  time = 0.13, size = 49, normalized size = 1.00 \[ -\frac {3\,\mathrm {atanh}\left (\cos \left (a+b\,x\right )\right )}{8\,b}-\frac {\frac {3\,{\cos \left (a+b\,x\right )}^2}{8}-\frac {1}{4}}{b\,\left (\cos \left (a+b\,x\right )-{\cos \left (a+b\,x\right )}^3\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(sin(a + b*x)*sin(2*a + 2*b*x)^2),x)

[Out]

- (3*atanh(cos(a + b*x)))/(8*b) - ((3*cos(a + b*x)^2)/8 - 1/4)/(b*(cos(a + b*x) - cos(a + b*x)^3))

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \csc {\left (a + b x \right )} \csc ^{2}{\left (2 a + 2 b x \right )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(b*x+a)*csc(2*b*x+2*a)**2,x)

[Out]

Integral(csc(a + b*x)*csc(2*a + 2*b*x)**2, x)

________________________________________________________________________________________